home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 103 < prev    next >
Encoding:
Text File  |  1996-08-05  |  816 b   |  37 lines

  1. Path: citi2.fr!laba
  2. From: labed@math-info.univ-paris5.fr (A.Labed)
  3. Newsgroups: comp.lang.c
  4. Subject: SYSTEM CALL RESULT
  5. Date: 2 Jan 1996 16:38:42 GMT
  6. Organization: CITI2 - Universite Rene Descartes, Paris
  7. Sender: laba@jupiter (Ali.Labed)
  8. Distribution: world
  9. Message-ID: <4cbn2i$env@bisance.citi2.fr>
  10. NNTP-Posting-Host: jupiter-gw.citi2.fr
  11. Keywords: SYSTEM CALL RESULT
  12.  
  13.  
  14. Hi,
  15.  
  16. Is there a way to get the result of a
  17. system call within a C program. 
  18. example :
  19. main()
  20. {
  21.   system( "ps | wc -l " )
  22. }
  23.  
  24. I would like to know the number of
  25. processes and to get this information 
  26. from within a C program.
  27.  
  28. Thank you.
  29.  
  30.  
  31.   A LABED 
  32.   email    : labed@math-info.univ-paris5.fr
  33.   Addresse : E.H.E.I. , UFR Mathematique et Informatique
  34.              Universite Rene Descartes
  35.              45, Rue des Saints Peres
  36.              Paris. 
  37.